<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>使用 uuencode 编码一个字符串</title>
 </head>
 <body class="docs"><div id="layout">
  <div id="layout-content"><div id="function.convert-uuencode" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">convert_uuencode</h1>
  <p class="verinfo">(PHP 5, PHP 7)</p><p class="refpurpose"><span class="refname">convert_uuencode</span> &mdash; <span class="dc-title">使用 uuencode 编码一个字符串</span></p>

 </div>
 
 <div class="refsect1 description" id="refsect1-function.convert-uuencode-description">
  <h3 class="title">说明</h3>
  <div class="methodsynopsis dc-description">
   <span class="methodname"><strong>convert_uuencode</strong></span>
    ( <span class="methodparam"><span class="type">string</span> <code class="parameter">$data</code></span>
   ) : <span class="type">string</span></div>

  <p class="para rdfs-comment">
   <span class="function"><strong>convert_uuencode()</strong></span> 使用 uuencode 算法对一个字符串进行编码。
  </p>
  <p class="para">
   uuencode 算法会将所有（含二进制数据）字符串转化为可输出的字符，
   并且可以被安全的应用于网络传输。使用 uuencode 编码后的数据
   将会比源数据大35%左右
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-function.convert-uuencode-parameters">
  <h3 class="title">参数</h3>
  <p class="para">
   <dl>

    
     <dt>
<code class="parameter">data</code></dt>

     <dd>

      <p class="para">
       需要被编码的数据。
      </p>
     </dd>

    
   </dl>

  </p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-function.convert-uuencode-returnvalues">
  <h3 class="title">返回值</h3>
  <p class="para">
   返回 uuencode 编码后的数据  或者在失败时返回 <strong><code>FALSE</code></strong>。
  </p>
 </div>


 <div class="refsect1 examples" id="refsect1-function.convert-uuencode-examples">
  <h3 class="title">范例</h3>
  <p class="para">
   <div class="example" id="example-5896">
    <p><strong>Example #1 <span class="function"><strong>convert_uuencode()</strong></span> 例子</strong></p>
    <div class="example-contents">
<div class="phpcode"><pre><span style="color: #000000">
<span style="color: #0000BB">&lt;?php<br />$some_string&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #DD0000">"test\ntext&nbsp;text\r\n"</span><span style="color: #007700">;<br /><br />echo&nbsp;</span><span style="color: #0000BB">convert_uuencode</span><span style="color: #007700">(</span><span style="color: #0000BB">$some_string</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">?&gt;</span>
</span>
</pre></div>
    </div>

   </div>
  </p>
 </div>


 <div class="refsect1 seealso" id="refsect1-function.convert-uuencode-seealso">
  <h3 class="title">参见</h3>
  <p class="para">
   <ul class="simplelist">
    <li class="member"><span class="function"><a href="convert_uudecode.html" class="function" rel="rdfs-seeAlso">convert_uudecode()</a> - 解码一个 uuencode 编码的字符串</span></li>
    <li class="member"><span class="function"><a href="base64_encode.html" class="function" rel="rdfs-seeAlso">base64_encode()</a> - 使用 MIME base64 对数据进行编码</span></li>
   </ul>
  </p>
 </div>


</div></div></div></body></html>